home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Samples / C++ / Direct3D / EffectEdit / TextView.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-09-27  |  2.8 KB  |  105 lines

  1. #if !defined(AFX_TEXTVIEW_H__B9E03A92_7060_4CD6_9661_714C5EA7C59A__INCLUDED_)
  2. #define AFX_TEXTVIEW_H__B9E03A92_7060_4CD6_9661_714C5EA7C59A__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // TextView.h : header file
  8. //
  9.  
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CTextView form view
  12.  
  13. #ifndef __AFXEXT_H__
  14. #include <afxext.h>
  15. #endif
  16.  
  17. class CMyRichEditCtrl : public CRichEditCtrl
  18. {
  19. public:
  20.     CMyRichEditCtrl();
  21.     ~CMyRichEditCtrl();
  22.  
  23. protected:
  24.     // Generated message map functions
  25.     //{{AFX_MSG(CMyRichEditCtrl)
  26.     afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
  27.     //}}AFX_MSG
  28.     DECLARE_MESSAGE_MAP()
  29.  
  30.     HMODULE m_hRELibrary;   // Rich Edit DLL handle
  31. };
  32.  
  33. class CTextView : public CFormView
  34. {
  35. protected:
  36.     CTextView();           // protected constructor used by dynamic creation
  37.     DECLARE_DYNCREATE(CTextView)
  38.  
  39. // Form Data
  40. public:
  41.     //{{AFX_DATA(CTextView)
  42.     enum { IDD = IDD_EFFECTTEXT_FORM };
  43.     CString m_strEdit;
  44.     //}}AFX_DATA
  45.  
  46. // Attributes
  47. public:
  48.     CEffectDoc* GetDocument();
  49.  
  50. // Operations
  51. public:
  52.     void SelectLine( int nLine );
  53.     void UpdateFont();
  54.     void SetExternalEditorMode(BOOL bExternal);
  55.  
  56. // Overrides
  57.     // ClassWizard generated virtual function overrides
  58.     //{{AFX_VIRTUAL(CTextView)
  59.     public:
  60.     virtual void OnInitialUpdate();
  61.     protected:
  62.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  63.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  64.     //}}AFX_VIRTUAL
  65.  
  66. // Implementation
  67. protected:
  68.     CMyRichEditCtrl m_MyEdit;
  69.     CFindReplaceDialog* m_pFRDlg;
  70.     CTime m_timeLastChanged;
  71.     virtual ~CTextView();
  72. #ifdef _DEBUG
  73.     virtual void AssertValid() const;
  74.     virtual void Dump(CDumpContext& dc) const;
  75. #endif
  76.  
  77.     // Generated message map functions
  78.     //{{AFX_MSG(CTextView)
  79.     afx_msg void OnTimer(UINT nIDEvent);
  80.     afx_msg void OnSize(UINT nType, int cx, int cy);
  81.     afx_msg void OnChangeEdit();
  82.     afx_msg void OnEditUndo();
  83.     afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
  84.     afx_msg void OnEditCopy();
  85.     afx_msg void OnEditCut();
  86.     afx_msg void OnEditPaste();
  87.     afx_msg void OnEditFind();
  88.     afx_msg LRESULT OnFindReplace(WPARAM wParam, LPARAM lParam);
  89.     //}}AFX_MSG
  90.     DECLARE_MESSAGE_MAP()
  91.     virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  92. };
  93.  
  94. #ifndef _DEBUG  // debug version in TextView.cpp
  95. inline CEffectDoc* CTextView::GetDocument()
  96.    { return (CEffectDoc*)m_pDocument; }
  97. #endif
  98.  
  99. /////////////////////////////////////////////////////////////////////////////
  100.  
  101. //{{AFX_INSERT_LOCATION}}
  102. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  103.  
  104. #endif // !defined(AFX_TEXTVIEW_H__B9E03A92_7060_4CD6_9661_714C5EA7C59A__INCLUDED_)
  105.